<template>
  <div id="buy02">
    <table class="table">
      <thead>
        <tr>
          <th>订单号</th>
          <th>订单名称</th>
          <th>支付终端</th>
          <th>支付方式</th>
          <th>支付金额￥</th>
          <th>订单状态</th>
          <th>支付时间</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item, index) in response" :key="'table' + index">
          <td>{{ item.orderId }}</td>
          <td>{{ item.orderName }}</td>
          <td>{{ item.tradeType }}</td>
          <td>{{ item.payType == 1 ? "微信" : "支付宝" }}</td>
          <td>{{ item.payAmount }}</td>
          <!-- <td>{{ item.status == '1'?'支付成功':"支付失败" }}</td> -->
          <td>支付成功</td>
          <td>{{ item.payTime }}</td>
        </tr>
      </tbody>
    </table>
    <div class="empty mt_30" v-if="!loading && response.length == 0">
      <img src="@/assets/liu/zw.png" />
      <p>暂无会员购买记录</p>
    </div>
  </div>
</template>
<script>
export default {
  name: "buy02",
  components: {},
  data() {
    return {
      response: [],
      loading: true
    };
  },
  computed: {},
  created() {
    this.get_data();
  },
  mounted() {},
  methods: {
    get_data() {
      this.loading = true;
      let that = this;
      this.$axios({
        method: "get",
        url: "/api/pay/GetMyOrderInfo",
        params: {
          page: 1,
          size: 9999999
        }
      })
        .then(response => {
          this.loading = false;
          if (response.data.code == 0) {
            this.response = response.data.data.datalist;
          }
        })
        .catch(error => {
          this.loading = false;
          console.log(error);
        });
    }
  }
};
</script>
<style scoped lang="less">
table {
  text-align: center;
  tbody {
    tr {
      height: 70px;
      // > td:nth-child(2) {
      //   color: #1779ff !important;
      // }
      td {
        font-size: 16px;
        color: #222222;
      }
    }
  }
}

#buy02 {
  padding: 20px;
}
</style>
